<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
</head>
<body>
	<c:import url="/WEB-INF/jsp/search/pager.jsp"/>
	<div id="childrenResult"></div>
	<div class="searchResultSet">
		<c:forEach items="${results}" var="re">
			<c:set var="text" value="${fn:toUpperCase(re.answer)}"/>
			<c:forEach items="${keywords}" var="kw">
				<c:set var="kw" value="${fn:toUpperCase(kw)}"/>
				<c:set var="fmted" value="<em>${kw}</em>"/>
				<c:set var="text" value="${fn:replace(text,kw,fmted)}"/>
			</c:forEach>
			<div class="ssResult">
				<h1>
					<a class="title" target="_blank"
					href="<c:url value="/logined/search/detail.do"/>?quesId=${re.quesId}&id=${re.resultId}&parentId=${re.parentId}">
					${re.brief}</a>
					&nbsp;&nbsp;
					<c:if test="${re.parentId>0}">
						<span class="sub">来自:</span> 
						<a class="sub" target="_blank"
						href="<c:url value="/logined/search/detail.do"/>?quesId=${re.parent.quesId}&id=${re.parent.id}&parentId=${re.parent.parentId}">
						${re.parent.brief}</a>
					</c:if>
					<c:if test="${'true'==hasChildQues}">
						<a class="sub" reId="${re.resultId}" href="javascript:void(0)">查看子问卷 &gt;&gt;</a>
					</c:if>
				</h1>
				<div class="ssBrief">
					<b>${re.question}</b>
					&nbsp;&nbsp;
					${text}
					<br>...
				</div>
				<div class="ssFooter">
					<fmt:setLocale value="zh_CN" />
					<fmt:formatDate value="${re.createTime}" type="both"
					dateStyle="full" timeStyle="long"/>
				</div>
			</div>
		</c:forEach>
	</div>
	<c:import url="/WEB-INF/jsp/search/pager.jsp"/>
</body>
</html>